package com.warehouse.mapper;

import com.warehouse.entity.Order;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.time.LocalDateTime;
import java.util.List;

@Mapper
public interface OrderMapper {
    
    List<Order> selectAll();
    
    Order selectById(@Param("id") Long id);
    
    Order selectByOrderNumber(@Param("orderNumber") String orderNumber);
    
    List<Order> selectByCustomer(@Param("customer") String customer);
    
    List<Order> selectByStatus(@Param("status") String status);
    
    List<Order> selectByDateRange(@Param("startTime") LocalDateTime startTime, 
                                 @Param("endTime") LocalDateTime endTime);
    
    int insert(Order order);
    
    int update(Order order);
    
    int updateStatus(@Param("id") Long id, @Param("status") String status);
    
    int deleteById(@Param("id") Long id);
    
    long countAll();
} 